package com.zhangpingyang.springcloud.feignservice.api.fallback;

import com.zhangpingyang.springcloud.feignservice.api.UserService;
import com.zhangpingyang.springcloud.feignservice.domain.CommonResult;
import com.zhangpingyang.springcloud.feignservice.domain.User;
import org.springframework.stereotype.Component;

/**
 * @Author: Zhang Pingyang
 * @Date: 2019/11/27 19:42
 */
@Component
public class UserFallbackService implements UserService {
    @Override
    public CommonResult create(User user) {
        return null;
    }

    @Override
    public CommonResult<User> getUser(Long id) {
        User defaultUser = new User(-1L, "defaultUser", "123456");

        return new CommonResult<>(defaultUser);
    }

    @Override
    public CommonResult<User> getByUsername(String username) {
        return null;
    }

    @Override
    public CommonResult update(User user) {
        return null;
    }

    @Override
    public CommonResult delete(Long id) {
        return null;
    }
}
